package com.fjh.security.easy.starter.sample.controller;

import com.fjh.security.easy.starter.util.HttpSessionUtil;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fanjh37
 * @since 2023/2/8 10:48
 */
@RestController
public class TestController {

    @GetMapping("getCurrentUser")
//    @EasyPermission
    public UserDetails getCurrentUser() {
        return HttpSessionUtil.getUser();
    }

}
